package com.edu.edumanager.mapper;

import com.edu.edumanager.bean.EduSubject;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface EduSubjectMapper {

    EduSubject findSubjectByName(@Param("name") String oneName);

    int addSubject(EduSubject eduSubject);

    List<EduSubject> selectAllSubject(int parentId);

    List<EduSubject> findSubjectByParentId(Integer parentId);

    int deleteSubjectByParentId(Integer id);

    int deleteSubjectById(Integer id);

    int updateSubjectById(EduSubject eduSubject);

    String findSubjectTitleById(Integer subjectId);
}